<html>   
<head>   
<title></title>   
<script language="javascript" type="text/javascript">  
var orderDoc;  
//获取xml文件  
//获取xml文件
function loadXmlFile(xmlFile,name,url){
    var xmlDom = null;
    var serverurl = "";
    if (window.ActiveXObject){
        xmlDom = new ActiveXObject("Microsoft.XMLDOM");
        xmlDom.async=false;
        xmlDom.load(xmlFile)||xmlDom.loadXML(xmlFile);//如果用的是XML字符串//如果用的是xml文件
    }else if (document.implementation && document.implementation.createDocument){
        var xmlhttp = new window.XMLHttpRequest();
        xmlhttp.open("GET", xmlFile, false);
        xmlhttp.send(null);
        xmlDom = xmlhttp.responseXML;
        serverurl = xmlDom.element(name).element(url);
    }else{
        xmlDom = null;
    }
    return serverurl;
}

var serverurl = loadXmlFile("123.xml","reg","url");
console.log(serverurl);
</script>  
</head>   
<body>   
</body>   
</html> 